package edu.zut.cs.software.cms.module.information.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.cs.software.cms.base.service.impl.GenericManagerImpl;
import edu.zut.cs.software.cms.module.information.dao.InformationDao;
import edu.zut.cs.software.cms.module.information.domain.Information;
import edu.zut.cs.software.cms.module.information.service.InformationManager;

@Service(value = "informationManager")
public class InformationManagerImpl extends GenericManagerImpl<Information, Long> implements InformationManager {
	InformationDao informationDao;

	@Autowired
	public void setInformationDao(InformationDao informationDao) {
		this.informationDao = informationDao;
		this.dao = this.informationDao;
	}

	@Override
	public boolean deleteById(long id) {
		if (informationDao.IfOneExist(id) > 0)
			return true;
		else
			return false;

	}
}
